﻿@model IEnumerable<OnlineBookstore.Models.BookDetailsInfo>

@foreach (var item in Model)
{
    <div class="book-card">
        <a href="@Url.Action("GetBookDetails", new { id = item.Id })" class="image-container">
            <img src="@item.Bookcover" class="book-cover" alt="@item.BookName 封面">
        </a>
        <div class="book-info">
            <h3 class="book-title">@item.BookName</h3>
            <div class="book-meta">
                <div><i class="fas fa-user-edit"></i> @item.BookAuthor</div>
                <div><i class="fas fa-building"></i> @item.Bookpress</div>
                <div><i class="fas fa-tag"></i> @item.Booksort</div>
            </div>
            <div class="book-price">¥@item.BookPrice</div>
            @Html.ActionLink("立即购买", "GetBookDetails", new { id = item.Id }, new { @class = "action-btn" })
        </div>
    </div>
}